package ch.zbw.timeline.domain;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Data;

/**
 * Domain class for an employment status
 */
@Entity
@SequenceGenerator(name = "id_employment_status", initialValue = 1, allocationSize = 1)
@Table(name = "employment_status")
@Data
public class EmploymentStatus implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id_employment_status", nullable = false)
	private int id;

	@Column(name = "fk_employee", nullable = false)
	private int employeeFk;

	@Column(name = "percent", nullable = true)
	private Integer percent;

	@Column(name = "date_created", nullable = true)
	private Date dateCreated;

	public EmploymentStatus() {
	}

	public EmploymentStatus(int employeeFk, Integer percent, Date dateCreated) {
		this.employeeFk = employeeFk;
		this.percent = percent;
		this.dateCreated = dateCreated;
	}

}
